# -*- coding:utf-8 -*-
# @Time : 8/15/21 11:01 AM
# @Author :  rebeater
# @File : GenerateTestData.py
# @Project:  BigintgetDemo
# @Function: TODO


import random

opetators = ['+', '-', '*']

def GenerateTestData(filename: str):
    length = 1000
    max_data = int(1e7)
    with open(filename, 'w') as f:
        for i in range(length):
            opa = opetators[random.randint(0, len(opetators)-1)]
            a = random.randint(-max_data, max_data)
            b = random.randint(-max_data, max_data)
            if opa == '+':
                c = a + b
            elif opa == '-':
                c = a - b
            elif opa == '*':
                c = a * b
            else:
                c = a / b

            f.write("%d %c %d  %d\n" % (a, opa, b,c))


if __name__ == '__main__':
    GenerateTestData("testdata.txt")
